package com.daka.dao;

import com.daka.entity.User;
import com.daka.mybatis.SQLMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository(value = "userDao")
@SQLMapper

public interface UserDao {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    int insertBatch(List<User> userList);

    User selectByPrimaryKey(Long id);

    User selectByOldId(Long oldId);

    List<User> selectByMobile(String mobile);

    List<User> selectByEmail(String email);

    List<String> selectByMobileGroup();

    List<String> selectByEmailGroup();

    List<User> selectByIdBetween(@Param("max") Integer max,@Param("min") Integer min);

    List<User> selectByStatement(User record);

    int selectByStatementCount(User record);

    int updateByPrimaryKeySelective(User record);

    int updateOldIdAndOldCodeById(User user);
}